Many communication protocols use data that are encoded using an 8b/10b encoding scheme. The 8b/10b encoding scheme is designed for encoding 8 bits of data into 10 bits of encoded data. In addition to encoding data, the 8b/10b encoding scheme permits a limited number of control characters to be encoded. For each of the 256 possible values for 8 bits of data and each of the typically 12 possible control characters, the 8b/10b encoding scheme has one, or a pair of, corresponding 10 bit encodings.
The 8b/10b encoding scheme permits the data and control codes to be communicated over communication media in a manner that is band-limited and run-length limited. The communication media may be copper cable, fiber optic cable, or traces on a printed circuit board.
The 8b/10b encoding scheme is band limited because the frequency components of a signal encoded using the 8b/10b encoding scheme are limited to a band of frequencies, and this band of frequencies does not include a DC component. The band limiting may reduce the distortion of the signal by the communication media due to dispersion of the various frequency components. The lack of a DC component may permit capacitive coupling of the signal.
The limited run-length and associated high transition density of the 8b/10b encoding scheme may permit a phase locked loop, or a clock and data recovery circuit (CDR), to recover from a received signal the clock used to transmit the signal. Because a separate clock signal is not needed, the 8b/10b encoding scheme may reduce the number of signals needed to transmit data over a communication media.
Conventionally, an 8-bit data unit may be divided into a 3-bit data unit and a 5-bit data unit. The 3-bit data unit is encoded into a 4-bit encoded data unit, and the 5-bit data unit is encoded into a 6-bit encoded data unit. The 4-bit encoded data unit and the 6-bit encoded data unit are then combined into a 10-bit data unit. Various encoding schemes have been proposed to implement the 8b/10b encoding. It is desirable that after the 8b/10b encoding, the resulting data stream does not have more than five “1”s or more than five “0”s. It is more desirable that the running disparity, which indicates the difference between the number of “1”s and the number of “0”s, is balanced. That is, if a 10-bit data unit has a positive or negative disparity, the following 10-bit data unit preferably has a negative or positive disparity, respectively, so that the overall disparity is balanced, and the DC component of the transmitted data is substantially eliminated. An example of a conventional 8b/10b encoding scheme is discussed in an article by A. X. Widmer, et al., entitled “A DC-Balanced, Partitioned-Block, 8B/10B Transmission Code,” which article is incorporated herein by reference, and is referred to as Widmer hereinafter.
In the conventional data encoding schemes, since the encoding of an 8-bit data unit preferably balances the disparity in the previous 8-bit data units, the encoding of each data unit has to depend on the encoding results of the previous data units. Therefore, the encoding of an 8-bit data unit cannot start before the previous 8-bit data unit has been encoded, and the running disparity is known. This significantly reduces the encoding speed. The situation is further worsened since even inside the encoding of an 8-bit data unit, which includes a 5b/6b coding and a 3b/4b encoding, the encoding of the later one has to wait until the disparity of the earlier one is known before it can be encoded. Therefore, for a 16-bit data unit, which may be divided into a first 5-bit data unit, a first 3-bit data unit, a second 5-bit data unit, and a second 3-bit data unit, beginning the encoding of the first 3-bit data unit has to be postponed until the encoding of the first 5-bit data unit is completed. Similarly, the second 3-bit data unit cannot begin being encoded until the encoding of the first 3-bit data unit is finished. The encoding of the second 3-bit data unit has to wait for all previous encodings to be completed. New encoding schemes for improving the encoding speeds are thus needed.